# encoding: utf-8

"""
遍历musician_photo目录下的图片，产生一个列表文件musician_photo.txt
musician_photo.txt的格式：
    uname:photo1|photo2|...
"""

import os

def main():
    f = open('musician_photo.txt', 'w')
    for uname in os.listdir('./musician_photo'):
        f.write(uname)
        f.write(':')
        f.write('|'.join(os.listdir('./musician_photo/' + uname)))
        f.write('\n')
    f.close()

if __name__ == '__main__':
    main()
